home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE02 / XTOOLS / XTOOL.ZIP / DBFILTER.TXT < prev    next >
Encoding:
Text File  |  1995-05-27  |  1.6 KB  |  57 lines

  1. DbFilter is a none visual component which lets you filter a dataset.
  2. This is done with BDE filters.
  3.  
  4. For registration info look in the file xTool.Txt.
  5.  
  6. TDbFilter
  7. =========
  8.  
  9. propertys
  10. ---------
  11.    Handle : hDBIFilter
  12.  
  13.      This read-only property returns the handle of the
  14.      BDE filter.
  15.  
  16.    DataSource : TDataSource
  17.  
  18.      Here you set the datasource which you want to connect to.
  19.      Every time you change the activation of the datasource
  20.      the filter is reassign.
  21.  
  22.    Priority : Word
  23.  
  24.      This is the priority that the filter has. The value depends
  25.      from 1..n where 1 is the highest priority. The value is
  26.      given directly to BDE at the time the filter is created.
  27.  
  28. Events
  29. ------
  30.    OnFilter : TFilterEvent
  31.  
  32.       To this event is called each time the filter needs
  33.       to know if the current records fits or not. You can
  34.       must return TRUE or FALSE as functions result to indicate
  35.       should happen.
  36.  
  37.       A sample event-handler looks like :
  38.  
  39.       function TForm1.DbFilter1Filter(Sender: TObject;
  40.         Dataset: TDataset): Boolean;
  41.       begin
  42.         Result:=(fldCustType.Value = 'A') and
  43.                 (fldCustCredit.Value >= 10000.0);
  44.       end;
  45.  
  46.       Don't do a lot of functions in the call because it
  47.       can be decrease your browsing performance. If you
  48.       filter an area in a table you better use a SetRange
  49.       call. At this time related tables and calculated
  50.       fields not supported, sorry.
  51.  
  52.       If you change the filter-function, ever do a TTable.Refresh
  53.       do ensures all data is re-filtered !
  54.  
  55.  
  56.  
  57.